<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Auth;

class Role extends Model
{
    protected $fillable = [
        'name', 'description', 'active','permission_ids','partid'
    ];

    public static function hasrole($rid){
        $role = new self();
        $rel = $role->where('id',$rid)->where('partid',Auth::user()->partid)->first();
        return $rel;
    }


}
